<?php
namespace App\Model;

/**
 * @Author:: HuangYin
 * @DateTime: 2017-01-16 11:21
 *
 * @Description:
 */
class MemberIntegral extends BaseModel
{
    // 消费
    const SPENDING = 1;
    // 消耗
    const CONSUME  = 2;
    // 退还
    const REFUND = 3;

    protected $table = 'member_integral';

    protected $visible = ['id', 'uid', 'name', 'store_id', 'integral', 'type', 'memo', 'created_at'];

    public function integrals()
    {
        return $this->hasOne('App\Model\Member', 'uid', 'uid');
    }
}